<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>用户登录 - 照片管理系统</title>
    <!-- Tailwind CSS -->
    <script src="https://cdn.tailwindcss.com"></script>
    <script>
        tailwind.config = {
            theme: {
                extend: {
                    colors: {
                        primary: {
                            DEFAULT: '#4361ee',
                            light: '#738bff',
                            dark: '#2b4acb'
                        },
                        secondary: {
                            DEFAULT: '#7209b7',
                            light: '#9d4eda',
                            dark: '#5a0591'
                        }
                    }
                }
            }
        }
    </script>
    <!-- Google Fonts -->
    <link href="https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;700&display=swap" rel="stylesheet">
    <!-- 自定义样式 -->
    <link rel="stylesheet" href="css/main.css">
    <link rel="stylesheet" href="css/login.css">
</head>
<body>
    <div class="login-container">
        <div class="login-card">
            <!-- 登录表单 -->
            <form id="loginForm" class="login-form">
                <div class="login-header">
                    <h1 class="login-title">欢迎登录</h1>
                    <p class="login-subtitle">照片管理系统</p>
                </div>
                
                <div id="loginError" class="error-message hidden">
                    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" width="16" height="16">
                        <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"/>
                    </svg>
                    <span>用户名或密码错误</span>
                </div>
                
                <div class="form-group">
                    <label for="username">用户名</label>
                    <input type="text" id="username" name="username" class="form-control" placeholder="请输入用户名" required>
                </div>
                
                <div class="form-group">
                    <label for="password">密码</label>
                    <input type="password" id="password" name="password" class="form-control" placeholder="请输入密码" required>
                </div>
                
                <div class="form-remember">
                    <label class="checkbox-container">
                        <input type="checkbox" id="rememberMe">
                        <span class="checkmark"></span>
                        记住我
                    </label>
                    <span class="forgot-password">忘记密码?</span>
                </div>
                
                <button type="submit" class="login-button">登录</button>
                
                <div class="login-footer">
                    <span>还没有账号?</span>
                    <a href="#" id="showRegister" class="register-link">立即注册</a>
                </div>
            </form>
            
            <!-- 注册表单 -->
            <form id="registerForm" class="login-form hidden">
                <div class="login-header">
                    <h1 class="login-title">创建账号</h1>
                    <p class="login-subtitle">照片管理系统</p>
                </div>
                
                <div id="registerError" class="error-message hidden">
                    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" width="16" height="16">
                        <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"/>
                    </svg>
                    <span>用户名已存在</span>
                </div>
                
                <div class="form-group">
                    <label for="regUsername">用户名</label>
                    <input type="text" id="regUsername" name="regUsername" class="form-control" placeholder="请输入用户名" required>
                </div>
                
                <div class="form-group">
                    <label for="regPassword">密码</label>
                    <input type="password" id="regPassword" name="regPassword" class="form-control" placeholder="请输入密码" required>
                </div>
                
                <div class="form-group">
                    <label for="confirmPassword">确认密码</label>
                    <input type="password" id="confirmPassword" name="confirmPassword" class="form-control" placeholder="请再次输入密码" required>
                </div>
                
                <button type="submit" class="login-button">注册</button>
                
                <div class="login-footer">
                    <span>已有账号?</span>
                    <a href="#" id="showLogin" class="register-link">立即登录</a>
                </div>
            </form>
        </div>
    </div>
    
    <!-- 引入脚本 -->
    <script src="js/auth.js"></script>
</body>
</html>